package com.example.zhongshuishi.service.implService;


import com.example.zhongshuishi.entity.PersonnelDto;
import com.example.zhongshuishi.entity.StudentDto;
import com.example.zhongshuishi.mapper.PersonnelMapper;
import com.example.zhongshuishi.mapper.StudentMapper;
import com.example.zhongshuishi.service.PersonnelService;
import com.example.zhongshuishi.service.StudentService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 鑳℃垬纾�
 * @version 1.0
 * @description TODO
 * @date 2025/3/29 11:21
 */
@Service
public class PersonnelServiceImpl implements PersonnelService {

    @Autowired
    private PersonnelMapper personnelMapper;
    @Override
    public int insert(PersonnelDto personnelDto) {
        return personnelMapper.insert(personnelDto);
    }

    @Override
    public int deleteById(String id) {
        return personnelMapper.deleteById(id);
    }

    @Override
    public int update(PersonnelDto personnelDto) {
        return personnelMapper.update(personnelDto);
    }

    @Override
    public PersonnelDto selectById(String id) {
        return personnelMapper.selectById(id);
    }

    @Override
    public List<PersonnelDto> selectByParentId(Integer parentId) {
        List<PersonnelDto> personnelDtos = personnelMapper.selectByParentId(parentId);
        return personnelDtos;
    }

    @Override
    public PersonnelDto selectByPhone(String phone) {
        return personnelMapper.selectByPhone(phone);
    }
}
